import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '@/views/home/index.vue'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'

const router = createRouter({
	history: createWebHashHistory(),
	routes: [
		{
			path: '/',
			component: HomeView,
			meta: {
				title: '大屏',
			},
		},
	],
})


router.beforeEach(async (to, from, next) => {
	NProgress.configure({ showSpinner: true })
	NProgress.start()

	next()
})

router.afterEach(() => {
	NProgress.done()
})

export default router
